package p0459;

/**
 * @author liucong
 * @date 2021/2/6 - 22:16
 */
public class L0459 {
    public static void main(String[] args) {

    }
}

class Solution {
    public boolean repeatedSubstringPattern(String s) {
        int n = s.length();
        for(int i=1;i<n;i++){
            if(n%i==0){
                boolean res=true;
                for(int j=i;j<n;j++){
                    if(s.charAt(j)!=s.charAt(j-i)){
                        res=false;
                        break;
                    }
                }
                if(res){
                    return true;
                }
            }
        }
        return false;
    }
}